{  Statement: http://acmp.ru/?main=task&id_task=409
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    i,n,s,k:longint;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
s := 0;
for i := 1 to n do begin
    read(k);
    if (i = 1) or (i = n) then inc(s, k) else inc(s, k * 2);
end;
write((0.5 * s / (n - 1)):0:16);
end.